﻿@model CultuRAM.Models.Event

@{
    ViewBag.Title = "Detalhes";
}

<h2>Detalhes do Evento</h2>

<fieldset>
    <legend>Evento</legend>

    <span class="display-label">
        <b>@Html.DisplayNameFor(model => model.Title):</b>
    </span>
    <span class="display-field">
        @Html.DisplayFor(model => model.Title)
    </span>
    <br/>
    <span class="display-label">
        <b>@Html.DisplayNameFor(model => model.StartDate):</b>
    </span>
    <span class="display-field">
       @Html.DisplayFor(model => model.StartDate)
    </span>
    <br/>
        <span class="display-label">
        <b>@Html.DisplayNameFor(model => model.EndDate):</b>
    </span>
    <span class="display-field">
       @Html.DisplayFor(model => model.EndDate)
    </span>
    <br/>
    <span class="display-label">
        <b>@Html.DisplayNameFor(model => model.Duration):</b>
    </span>
    <span class="display-field">
        @Html.DisplayFor(model => model.Duration)
    </span>
    <br/>
    <span class="display-label">
        <b>@Html.DisplayNameFor(model => model.Public):</b>
    </span>
    <span class="display-field">
        @Html.DisplayFor(model => model.Public)
    </span>
    <br/>
    <span class="display-label">
        <b>@Html.DisplayNameFor(model => model.EventType):</b>
    </span>
    <span class="display-field">
        @Html.DisplayFor(model => model.EventType.Type)
    </span>
</fieldset>

<div class="display-field">
    <table style="border: 1px solid;">
        <tr style="border: 1px solid;">
            <th>PROPRIEDADE</th>
            <th>VALOR</th>
        </tr>
        @foreach (var item in Model.PropertyValues)
        {
            <tr>
                <td><b>
                        @Html.DisplayFor(modelItem => item.EventProperty.Name)
                    </b></td>
                <td>
                    @Html.DisplayFor(modelItem => item.Value)
                </td>
            </tr>
        }
    </table>
</div>
<br/>
<p>
    @Html.ActionLink("Editar", "Edit", new { id=Model.EventId }, new {@class="btn btn-primary"}) 
    @Html.ActionLink("Voltar para a Lista de Eventos", "Index",null,new {@class="btn btn-default"})
</p>
